from django.urls import path,re_path
from ...views.api import *

basePrefix = 'admin/'
basePrefix2 = 'home/'
basePrefix3 = 'admin/'

urlpatterns = [
    # 测试接口
    path('test',IndexViews.test),

    # 认证API
    path(basePrefix+'login',IndexViews.login,name="myhome_api_login"),
    path(basePrefix+'register',IndexViews.register,name="myhome_api_register"),
    path(basePrefix+'logout',IndexViews.logout,name="myhome_api_logout"),
    path(basePrefix+'unregister',IndexViews.unregister,name="myhome_api_unregister"),

    # 前台API
    path(basePrefix2+'about',UserViews.about,name="myhome_api_about"),
    path(basePrefix2+'update', UserViews.update,name="myhome_api_update"),
    path(basePrefix2+'password', UserViews.password,name="myhome_api_password"),

    # 后台API
    path(basePrefix3+'searchAll', AdminViews.searchAll,name="myhome_api_searchAll"),
    path(basePrefix3+'searchDelAll', AdminViews.searchDelAll,name="myhome_api_searchDelAll"),
    path(basePrefix3+'searchUseAll', AdminViews.searchUseAll,name="myhome_api_searchUseAll"),
    path(basePrefix3+'search', AdminViews.search,name="myhome_api_search"),

]